body {
 
  font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header h1 {
  writing-mode: horizontal-tb;
  white-space: normal;
  display: inline-block; /* 防止意外的块级行为 */
}

header {
  position: relative; /* 新增 */
  background: linear-gradient(to right, #3B82F6, #2563EB);
  color: white;
  text-align: center;
  height: 100px;/* 更小的高度 */
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  font-size: 16px; /* 标题字体也稍微小一点 */
  padding-left: 180px;
  position: fixed;
  top: 0;
  z-index: 3;
  writing-mode: horizontal-tb;
  white-space: normal;
}

.logo-container {
  position: absolute; /* 绝对定位 */
  left: 60px; /* 侧边栏中点 90px - Logo 半宽 30px */
  top: 50%; /* 垂直居中 */
  transform: translateY(-50%); /* 精确垂直居中 */
  display: flex;
  align-items: center;
  gap: 12px; /* 可选：增加 Logo 与标题间距 */
}

.logo {
  height: 60px;
  margin-right: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out;
}

.logo:hover {
  transform: scale(1.05); /* 放大一点，提升交互体验 */
}

.sidebar {
  background-color: #3B82F6; /* 更柔和的蓝色 */
  color: white;
  width: 180px; /* 稍微缩小一些，使 main 区域更宽 */
  height: calc(100vh - 60px);
  position: fixed;
  top: 60px;
  left: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center; /* 修改为 center 实现垂直居中 */
  align-items: center; /* 保持水平居中 */
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15); /* 稍微增强阴影 */
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 2;
}

.sidebar a {
  padding: 20px 25px; /* 原 padding: 18px → 改为 20px 提升高度 */
  text-decoration: none;
  font-size: 22px; /* 原字体 20px → 改为 22px 更清晰 */
  font-weight: 600; /* 新增：字体加粗 */
  color: white;
  display: block;
  transition: background-color 0.3s;
  width: 100%;
  text-align: center;
  border-left: 3px solid transparent;
  letter-spacing: 0.5px; /* 新增：微调字间距，提升可读性 */
  font-family: 'Segoe UI', 'Inter', sans-serif; /* 新增：更现代字体 */
}

.sidebar a:hover {
  background-color: #1976D2;
  border-left: 3px solid #fff;
  font-weight: 700; /* 悬停时字体更粗 */
  transform: translateY(-3px); /* 新增：悬停时向上位移 3px */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 可选：增强阴影，提升立体感 */
}

main {
  padding: 80px 20px 60px 200px;
  max-width: 100%;
  margin: 0 auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直居中 */
  align-items: center; /* 水平居中 */
}

footer {
  background-color: #1E1E1E; /* 深灰黑，比纯黑更温和 */
  color: #CCCCCC; /* 浅灰色字体，提升对比度 */
  text-align: center;
  padding: 0px 0; /* 缩短垂直内边距 */
  position: fixed;
  width: 100%;
  bottom: 0;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
  font-size: 12px; /* 进一步压缩字体 */
  z-index: 3; /* 确保页脚在最上层 */
}

.card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* 更柔和的阴影 */
  padding: 32px;
  margin-bottom: 32px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center; /* 新增：使内部文字居中 */
  width: 100%; /* 新增：宽度为100% */
  max-width: 800px; /* 可选：设置最大宽度 */
}

.card:hover {
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2); /* 悬浮增强 */
}

.card h2 {
  margin-bottom: 24px;
  font-size: 24px;
  color: #1E4EA8;
  text-align: center; /* 强制标题居中 */
}

.card p {
  font-size: 16px;
  color: #555; /* 提高文字对比度 */
}

.button {
  background: linear-gradient(to bottom, #4285F4, #3367D6); /* 渐变按钮 */
  color: white;
  border: none;
  padding: 14px 28px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 20px;
  margin: 12px 4px;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.button:hover {
  background-color: #3367D6;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* 悬浮增强 */
}

.select-container {
  margin-bottom: 24px; /* 适当增加间距 */
}

label {
  display: block;
  margin-bottom: 8px; /* 更自然的标签间距 */
  font-weight: 600; /* 加粗标签 */
  color: #3B82F6; /* 使用主色调增强对比 */
}

select, input[type="file"] {
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  border: 2px solid #3B82F6; /* 强化边框 */
  border-radius: 6px;
  background-color: #F0F9FF; /* 淡蓝色背景提升可读性 */
  transition: border-color 0.3s, background-color 0.3s;
}

select:focus, input[type="file"]:focus {
  border-color: #1E4EA8; /* 更深的蓝色边框 */
  background-color: #E0F2FE; /* 焦点时浅蓝背景 */
}

.video-preview {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.recording-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.button.recording {
  background: linear-gradient(to bottom, #FF5722, #E64A19);
}

.button.recording:hover {
  background-color: #E64A19;
}



.recording-time {
  margin-top: 15px;
  font-size: 18px;
  color: #1E4EA8;
  font-weight: 600;
  text-align: center;
}


/* 文件上传错误样式 */
select:invalid, 
input[type="file"]:invalid {
  border-color: #EF4444;
  background-color: #FEF2F2;
}

/* 错误提示文本 */
.file-error {
  color: #DC2626;
  font-size: 14px;
  margin-top: 4px;
  display: none;
}



/* 优化题目区域样式 */
.question-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #3B82F6;
}

.question-header h3 {
  color: #1E4EA8;
  font-size: 20px;
  margin: 0;
}

.question-count {
  background-color: #3B82F6;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
}

.question-content {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-content p {
  font-size: 18px;
  color: #1F2937;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.question-navigation {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.nav-btn {
  background: linear-gradient(to bottom, #60A5FA, #3B82F6);
  padding: 10px 24px;
  font-size: 16px;
  border-radius: 8px;
}

.nav-btn:hover {
  background-color: #2563EB;
}

/* 在 styles.css 中添加题目编号动画效果 */
.question-count {
  animation: fadeIn 0.5s ease-in-out;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  padding: 6px 16px;
  border-radius: 24px;
  font-weight: 600;
}


#improvement-tips {
    background-color: #F9FAFB;
    border-left: 4px solid #3B82F6;
    padding: 16px;
    margin-top: 20px;
    border-radius: 8px;
    line-height: 1.6;
}

.mini-chart-container {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.chat-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    padding: 12px 16px;
    border-radius: 20px;
    max-width: 70%;
    line-height: 1.5;
    font-size: 16px;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
    background-color: #3B82F6;
    color: white;
}

.ai-message {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: #333;
}

.input-area {
    display: flex;
    gap: 8px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #3B82F6;
    border-radius: 6px;
}

